#include "GAF_PublicFace.h"

namespace GAF
{
	PublicFace::PublicFaceList PublicFace::ms_lstPublicFaces;

	void PublicFace::AddToScene(GAF_CScene* pScene)
	{
#ifndef GAF_HIDE_PUBLIC_FACE
		for(PublicFaceList::const_iterator _cit = ms_lstPublicFaces.begin();
			_cit != ms_lstPublicFaces.end(); _cit++)
		{
			if((*_cit)->GetEnable_a() == true)
				pScene->AddGraphics(*_cit);
		}
#endif
	}

	PublicFace::PublicFace()
	{
		ATTRIB(Enable)	= false;

		ms_lstPublicFaces.push_back(this);
	}

	PublicFace::~PublicFace()
	{
		ms_lstPublicFaces.remove(this);
	}
}
